package com.cruise.system.userapi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

import static com.cruise.common.core.constant.AuthConstants.DEFAULT_AVATAR;
import static com.cruise.common.core.constant.AuthConstants.DEFAULT_SIGNATURE;

/**
 * <p>
 *
 * </p>
 *
 * @author cruise
 * @since 2021-03-31
 */
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
public class SysUser implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.UUID)
    private String id;
    /**
     * 用户名
     */
    @TableField("username")
    private String username = "";
    /**
     * 密码
     */
    @TableField("password")
    private String password = "";
    /**
     * 真实名称
     */
    @TableField("truename")
    private String truename;
    /**
     * 生日
     */
    @TableField("birthday")
    private Date birthday;
    /**
     * 性别（0男1女）
     */
    @TableField("sex")
    private Integer sex;
    /**
     * 邮箱
     */
    @TableField("email")
    private String email;
    /**
     * 手机号
     */
    @TableField("phone")
    private String phone;
    /**
     * 账号状态（是否激活）
     */
    @TableField("status")
    private Integer status = 0 ;
    /**
     * 是否删除
     */
    @TableField("del_flag")
    private Integer delFlag = 0;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime = new Date();
    /**
     * 最后更新时间
     */
    @TableField("update_time")
    private Date updateTime = new Date();
    /**
     * 头像
     */
    @TableField("avatar")
    private String avatar = DEFAULT_AVATAR;
    /**
     * 用户昵称
     */
    @TableField("nickname")
    private String nickname ;
    /**
     * 签名
     */
    @TableField("signature")
    private String signature = DEFAULT_SIGNATURE;
    /**
     * 粉丝数
     */
    @TableField("fans_count")
    private Integer fansCount = 0 ;
    /**
     * 关注数
     */
    @TableField("concern_count")
    private Integer concernCount = 0 ;
    /**
     * 获赞数
     */
    @TableField("like_count")
    private Integer likeCount = 0 ;

    /**
     * 动态数
     */
    @TableField("post_count")
    private Integer postCount = 0;

    /**
     * 动态数
     */
    @TableField("video_count")
    private Integer videoCount = 0;

    public SysUser() {
    }

    public SysUser(String phone) {
        this.phone = phone;
    }
}

